#include <iostream>
#include <string>
#include <cmath>
int main() {

int n;
if (n <= 1) {
return false;}
for (int i = 2; i<=n; i++) {
if (n % i == 0) {
return false;}}
return true;}

string size_type p=0;
string word;
vector<string> words;
while ((pos = input.find(" ")) != np) {
word = input.substr(0, pos);
words.push_back(word);
input.erase(0, pos + 1);}
words.push_back(input);

if (words.size() != 3) {
cout << "Wrong input" <<endl;
return 1;}

int number;
try {
number = stoi(words[0] + words[1] + words[2]);}
cout << "Wrong input" <<endl;
return 1;}

if (number < 100 % number > 999) {
cout <<"Wrong input" <<endl;
return 1;}

int np = number;
while (!is_prime(np)) {np++;}
cout << np <<endl;
return 0;
}